1. Field
The present disclosure relates generally to data processing systems, and in particular, to graphically displaying data in a graphical user interface. Still more particularly, the present disclosure relates to a method and apparatus for generating labels for charts displayed graphically in a graphical user interface.
2. Background
Information from spreadsheets, databases, and other sources may be displayed graphically in a number of different ways. For example, bar graphs, line graphs, circular charts, and other types of charts or graphs may be used to provide a graphical representation of the information.
Circular charts include pie charts and data charts. These types of circular charts are divided into sections. Each section typically illustrates a numerical proportion to the quantity represented by the section. In particular, the arc length of each section represents the quantity as a proportion relative to other quantities represented by arc lengths in the circular chart.
Presenting the circular charts as accurately as possible and conveying information as efficiently as possible is desirable. For example, labels are often used in circular charts to convey information about what each section represents. A label contains text providing information about a section in the circular chart. Depending on the number of sections, the text for the labels, as well as other factors, may make placing the text in the labels into the different sections more challenging than desired.
For example, the number of words in the text for a label may be greater than that which will fit within a section of a circular chart. Having a line of text in a label from one section cross over into another section may lead to confusion in graphically conveying the data represented in the different sections of the circular chart. In other words, the graphical conveyance of information through the circular chart may not be as clear when a label placed in one section also extends into another section in the circular chart. For example, the text in one label may intersect with the text in another label or may be too close to the text in another label. As a result, graphically conveying what each section represents in the circular chart becomes confusing.
One solution to this issue involves abbreviating words used in the text for the labels. Abbreviations, however, may be unclear and lead to confusion in understanding the data being graphically represented by the circular chart. A legend may be used to define abbreviations. The legend, however, may be more complex than desired or may not provide the desired aesthetics for the graphical representation for the information.
Another solution involves using labels that are located outside of the circular chart. Lines, arrows, or other indicators may be used to associate the labels with different sections of the circular chart. These types of labels, however, may not provide the desired aesthetics for the graphical representation of the information. Additionally, the use of labels outside of the sections also may lead to increased difficulty in understanding the chart with the increased clutter of having labels outside of the different sections.
Therefore, it would be desirable to have a method and apparatus that take into account at least some of the issues discussed above, as well as other possible issues. For example, it would be desirable to have a method and apparatus that generate labels for display within sections of a circular chart that avoid issues such as text for one section extending into another section while providing a desired aesthetic graphical display of the data.